package com.txc.pay.controller;


import com.txc.common.global.result.Result;
import com.txc.pay.entity.PayLogEntity;
import com.txc.pay.service.IPayLogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * 支付接口调用记录 前端控制器
 *
 * @author TXC
 * @since 2023-12-26
 */
@RestController
@RequestMapping("/pay/log")
public class PayLogController {
    @Resource
    IPayLogService payLogService;

    @GetMapping("/getPayLogByTransactionId")
    public Result<?> getPayLogByTransactionId(String transactionId) {
        List<PayLogEntity> result = payLogService.getPayLogByTransactionId(transactionId);
        return Result.ok(result);
    }

}

